import request from '@/utils/request'

// 获取权限申请列表
export function listPermissions(query) {
  return request({
    url: '/did/access/list',
    method: 'get',
    params: query
  })
}

// 批准权限申请
export function approvePermission(id) {
  return request({
    url: `/did/access/approve/${id}`,
    method: 'put'
  })
}

// 撤销权限
export function revokePermission(id) {
  return request({
    url: `/did/access/revoke/${id}`,
    method: 'delete'
  })
}

// 获取访问日志(暂未实现)
export function listAccessLogs(query) {
  return request({
    url: '/api/dms/log/list',
    method: 'get',
    params: query
  })
}
